package com.storm.future.red.config;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @author gu
 * @date 2020/3/24 12:00
 */
@Aspect
@Component
public class BattleAspect {

    @Pointcut("execution(* com.storm.future.red.common.Soldier.attack(com.storm.future.red.common.Unit))")
    public void pointCut(){}

    @Before("pointCut()")
    public void before(){
        System.out.println(new Date() + "战斗即将开始");
    }
}
